// ssui_render.cpp : Defines the exported functions for the DLL application.
//

#include "stdafx.h"
#include "ui_render.h"
#include <GdiPlus.h>
#include "ui_sysfont_map.h"

_SSL_BEGIN
_SSUIL_BEGIN

static
ULONG_PTR gdiplus_token = 0;

bool UIRenderInit()
{
	if(gdiplus_token != 0)
		return true;
	Gdiplus::GdiplusStartupInput gdiplus_startup_input;
	Gdiplus::GdiplusStartup(&gdiplus_token, &gdiplus_startup_input,NULL);
	return true;
}

void UIRenderUninit()
{
	if(gdiplus_token == 0)
		return;
	stl_singleton<UISysFontMap>::DeleteInstance();
	Gdiplus::GdiplusShutdown(gdiplus_token);
	gdiplus_token = 0;
}

_SSUIL_END
_SSL_END

